package com.books.client;

import java.util.List;

import com.books.dao.BookDAO;
import com.books.dao.BookDAOImpl;
import com.books.model.Book;

public class BookApp {
	private static BookDAO bookDao=new BookDAOImpl();
	public static void main(String[] args){
		System.err.println("Listing all Books:");
		findAllBooks();
		System.out.println();
		//searchBooks("Josh");
		
	}
	
	private static void findAllBooks(){
		List<Book> books=bookDao.findAllBooks();
		for (Book book :books){
			System.out.println(book);
		}
		
	}
	
	private static void searchBooks(String keyWord) {
		List<Book> books=bookDao.searchBooksByKeyword(keyWord);
		for (Book book :books){
			System.out.println(book);
		}
	}
	
	
	
	

}
